import router from '@system.router';

var initData = 'this is first line\nthis is second line'
var extraLine = [];

export default {
  data: {
    text: initData,
  },
  add() {
    extraLine.push('other line')
    this.text = initData + '\n' + extraLine.join('\n')
  },
  remove() {
    if (extraLine.length > 0) {
      extraLine.pop()
      this.text = initData + '\n' + extraLine.join('\n')
    }
  },
  navigateBack(e) {
    router.back();
  }
}
